//
//  HMGuideCell.m
//  UI进阶-21-网易彩票
//
//  Created by 柯平常 on 16/4/7.
//  Copyright © 2016年 柯平常. All rights reserved.
//

#import "HMGuideCell.h"
#import "ZXLoginViewController.h"


#import "HMNavigationController.h"


@implementation HMGuideCell

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        UIButton *Btn = [UIButton buttonWithType:UIButtonTypeCustom];
        //设置btn图片
        [Btn setImage:[UIImage imageNamed:@"btn_guide"] forState:UIControlStateNormal];
        [Btn sizeToFit];
        Btn.y = self.height * 0.85;
        Btn.x = (self.width - Btn.width) / 2;
        [Btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:Btn];
//        HMLog(@"%@",NSStringFromCGRect(Btn.frame));
        self.go2Btn = Btn;
    }
    return self;
}


- (void)btnClick {
    
    // 1.获取窗口,应用程序的主场口

    //    [UIApplication sharedApplication].keyWindow.rootViewController = [[ZXLoginViewController alloc] init];

    [UIApplication sharedApplication].keyWindow.rootViewController = [[HMNavigationController alloc]initWithRootViewController:[[ZXLoginViewController alloc] init]];

    
    
}

@end
